﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 委托2
{
    internal class Program
    {

        delegate void D(string s);

        static void Main(string[] args)
        {
            Program program = new Program();

            D d = program.Hello;
            d("yejing");

            d = program.LiHao;
            d("叶静");


            Console.ReadKey();
        }

        public void Hello(string name)
        {
            Console.WriteLine($"hello {name}");
        }

        public void LiHao(string name)
        {
            Console.WriteLine($"你好,{name}");
        }
    }
}
